Skip to content

Commit

Permalink
test: update repo reload tests for pkgcraft changes
Browse files Browse the repository at this point in the history
  • Loading branch information
radhermit committed May 20, 2024
1 parent f09c905 commit dd05de3
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions test/test_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ def test_load_portage_conf
config.load_portage_conf(conf_path)
assert(config.repos.key?("test"))

# reloading causes error
assert_raises PkgcraftError do
config.load_portage_conf(conf_path)
end
# reloading succeeds
config.load_portage_conf(conf_path)

# reloading using a different id causes error
data = <<~CONFIG
Expand Down Expand Up @@ -114,14 +112,12 @@ def test_add_repo
config.add_repo(r2, id: "r2")
assert_equal([r1, r2], config.repos.entries)

# reloading causes error
assert_raises ConfigError do
config.add_repo(r1)
end
# reloading succeeds
assert_equal(r1, config.add_repo(r1))

# reloading using a different id causes error
assert_raises ConfigError do
config.add_repo(r1, id: "existing")
config.add_repo(r1.path, id: "existing")
end

# nonexistent repo
Expand Down

0 comments on commit dd05de3

Please sign in to comment.