-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
162 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
Check that index auto-update works as expected | ||
""" | ||
|
||
import os | ||
from drivers.alr import run_alr | ||
# from drivers.asserts import assert_eq, assert_match | ||
from drivers.helpers import content_of, lines_of | ||
|
||
CONFIG_FILE = os.path.join("alr-config", "config.toml") | ||
|
||
# First, we check no related configuration exists | ||
|
||
assert "auto_update_asked = true\n" not in lines_of(CONFIG_FILE), \ | ||
"UNEXPECTED:\n" + content_of(CONFIG_FILE) | ||
|
||
# Auto updates are disabled by default by the python harness, to maintain | ||
# compatibility of older tests. We disable the disabling now. | ||
|
||
run_alr("config", "--global", "--unset", "index.auto_update") | ||
# This was set to 0 to disable updates | ||
|
||
# After using the index, the user will have been asked | ||
|
||
run_alr("search", "hello") | ||
|
||
assert "auto_update_asked = true\n" in lines_of(CONFIG_FILE), \ | ||
"UNEXPECTED:\n" + content_of(CONFIG_FILE) | ||
|
||
print('SUCCESS') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
driver: python-script | ||
indexes: | ||
basic_index: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters