Skip to content

Commit cb9c607

Browse files
committed
(MODULES-2391) remove 'remove_sql_features' method
1 parent 03bf779 commit cb9c607

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

spec/acceptance/sqlserver_instance_spec.rb

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
require 'erb'
44

55
host = find_only_one("sql_host")
6-
inst_name = "MSSQL" + SecureRandom.hex(4)
7-
inst_name = inst_name.upcase
6+
inst_name = ("MSSQL" + SecureRandom.hex(4)).upcase
87

98
describe "sqlserver_instance", :node => host do
109
version = host['sql_version'].to_s
@@ -37,12 +36,10 @@ def ensure_sqlserver_instance(host, features, inst_name, ensure_val = 'present')
3736

3837
before(:all) do
3938
ensure_sqlserver_instance(host, features, inst_name, 'absent')
40-
remove_sql_features(host, {:features => features, :version => version})
4139
end
4240

4341
after(:all) do
4442
ensure_sqlserver_instance(host, features, inst_name, 'absent')
45-
remove_sql_features(host, {:features => features, :version => version})
4643
end
4744

4845
it "create #{inst_name} instance" do
@@ -54,7 +51,6 @@ def ensure_sqlserver_instance(host, features, inst_name, ensure_val = 'present')
5451
end
5552

5653
it "remove #{inst_name} instance" do
57-
remove_sql_features(host, {:features => features, :version => version})
5854
ensure_sqlserver_instance(host, features, inst_name, 'absent')
5955

6056
validate_sql_install(host, {:version => version}) do |r|
@@ -63,20 +59,18 @@ def ensure_sqlserver_instance(host, features, inst_name, ensure_val = 'present')
6359
end
6460
end
6561

66-
context "can create instance with only SQL feature" do
62+
context "can create instance with only one SQL feature" do
6763
features = ['SQL']
6864

6965
before(:all) do
7066
ensure_sqlserver_instance(host, features, inst_name, 'absent')
71-
remove_sql_features(host, {:features => features, :version => version})
7267
end
7368

7469
after(:all) do
7570
ensure_sqlserver_instance(host, features, inst_name, 'absent')
76-
remove_sql_features(host, {:features => features, :version => version})
7771
end
7872

79-
it "create #{inst_name} instance with only SQL feature" do
73+
it "create #{inst_name} instance with only one SQL feature" do
8074
ensure_sqlserver_instance(host, features, inst_name)
8175

8276
validate_sql_install(host, {:version => version}) do |r|
@@ -85,20 +79,18 @@ def ensure_sqlserver_instance(host, features, inst_name, ensure_val = 'present')
8579
end
8680
end
8781

88-
context "can create instance with only RS feature" do
82+
context "can create instance with only one RS feature" do
8983
features = ['RS']
9084

9185
before(:all) do
9286
ensure_sqlserver_instance(host, features, inst_name, 'absent')
93-
remove_sql_features(host, {:features => features, :version => version})
9487
end
9588

9689
after(:all) do
9790
ensure_sqlserver_instance(host, features, inst_name, 'absent')
98-
remove_sql_features(host, {:features => features, :version => version})
9991
end
10092

101-
it "create #{inst_name} instance with only RS feature" do
93+
it "create #{inst_name} instance with only one RS feature" do
10294
ensure_sqlserver_instance(host, features, inst_name)
10395

10496
validate_sql_install(host, {:version => version}) do |r|
@@ -107,28 +99,25 @@ def ensure_sqlserver_instance(host, features, inst_name, ensure_val = 'present')
10799
end
108100
end
109101

110-
context "can create instance with only AS feature" do
102+
context "can create instance with only one AS feature" do
111103
features = ['AS']
112104

113105
before(:all) do
114106
ensure_sqlserver_instance(host, features, inst_name, 'absent')
115-
remove_sql_features(host, {:features => features, :version => version})
116107
end
117108

118109
after(:all) do
119110
ensure_sqlserver_instance(host, features, inst_name, 'absent')
120-
remove_sql_features(host, {:features => features, :version => version})
121111
end
122112

123113
#skip below test due to ticket MODULES-2379, when the ticket was resolved
124114
# will change xit to it
125-
xit "create #{inst_name} instance with only AS feature" do
115+
xit "create #{inst_name} instance with only one AS feature" do
126116
ensure_sqlserver_instance(host, features, inst_name)
127117

128118
validate_sql_install(host, {:version => version}) do |r|
129119
expect(r.stdout).to match(/#{Regexp.new(inst_name)}/)
130120
end
131121
end
132122
end
133-
134123
end

0 commit comments

Comments
 (0)