Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make product renames updatable from SCC
(related to bnc#883206) - 3.1.27
- Loading branch information
Showing
9 changed files
with
85 additions
and
16 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ Makefile | |
Makefile.in | ||
aclocal.m4 | ||
autom4te.cache | ||
/coverage | ||
config.cache | ||
config.guess | ||
config.h | ||
|
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
TESTS = \ | ||
addon_product_test.rb \ | ||
packages_test.rb | ||
|
||
TEST_EXTENSIONS = .rb | ||
|
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,35 @@ | ||
#! /usr/bin/env rspec | ||
|
||
require_relative "./test_helper" | ||
|
||
Yast.import "AddOnProduct" | ||
|
||
describe Yast::AddOnProduct do | ||
describe "#renamed?" do | ||
it "returns true if product has been renamed" do | ||
expect(Yast::AddOnProduct.renamed?("SUSE_SLES", "SLES")).to be_true | ||
end | ||
|
||
it "returns false if the product rename is not known" do | ||
expect(Yast::AddOnProduct.renamed?("foo", "bar")).to be_false | ||
end | ||
end | ||
|
||
describe "#add_rename" do | ||
it "adds a new product rename" do | ||
expect(Yast::AddOnProduct.renamed?("FOO", "BAR")).to be_false | ||
Yast::AddOnProduct.add_rename("FOO", "BAR") | ||
expect(Yast::AddOnProduct.renamed?("FOO", "BAR")).to be_true | ||
end | ||
|
||
it "keeps the existing renames" do | ||
# add new rename | ||
Yast::AddOnProduct.add_rename("SUSE_SLES", "SLES_NEW") | ||
# check the new rename | ||
expect(Yast::AddOnProduct.renamed?("SUSE_SLES", "SLES_NEW")).to be_true | ||
# check the already known rename | ||
expect(Yast::AddOnProduct.renamed?("SUSE_SLES", "SLES")).to be_true | ||
end | ||
end | ||
|
||
end |
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,8 @@ | ||
ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) | ||
|
||
if ENV["COVERAGE"] | ||
require "simplecov" | ||
SimpleCov.start | ||
end | ||
|
||
require "yast" |