Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mvidner/Code-11-SP2
L3 bnc#769081 and a cleanup of related code
- Loading branch information
Showing
10 changed files
with
117 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.17.172 | ||
2.17.173 |
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
Empty file.
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,7 @@ | ||
Read .target.tmpdir "/tmp" | ||
Dump Read | ||
Read .target.size "/etc/hosts" 1 | ||
Dir .etc.hosts: ["10.0.0.1", "127.0.0.1"] | ||
Read .etc.hosts."10.0.0.1" ["somehost.example.com notice-two-spaces"] | ||
Read .etc.hosts."127.0.0.1" ["localhost localhost.localdomain"] | ||
Return true |
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,32 @@ | ||
//bnc#769081: two spaces and an empty oldhostname would remove a line | ||
{ | ||
|
||
include "testsuite.ycp"; | ||
|
||
map READ = $[ | ||
"target" : $[ | ||
"size" : 1, | ||
"tmpdir" : "/tmp", | ||
], | ||
"etc" : $[ | ||
"hosts" : $[ | ||
"127.0.0.1" : ["localhost localhost.localdomain"], | ||
"10.0.0.1" : ["somehost.example.com notice-two-spaces"], | ||
], | ||
], | ||
]; | ||
|
||
TESTSUITE_INIT([READ], nil); | ||
|
||
import "Assert"; | ||
import "Host"; | ||
import "Progress"; | ||
Progress::off(); | ||
|
||
DUMP("Read"); | ||
TEST(``(Host::Read()), [READ], nil); | ||
list<string> names = Host::Names("10.0.0.1"); | ||
Host::Update("", "newname", ["10.0.0.42"]); | ||
list<string> new_names = Host::Names("10.0.0.1"); | ||
Assert::Equal(names, new_names); | ||
} |