summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-11-03 11:05:54 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-11-03 11:05:54 +0100
commitfe34b745e71a3e4ebb18d77a186d24de23b50863 (patch)
tree2bdd95c57370fcedc387511c1b9ec901051172f9
parent1056c9d2d2481ee4fe3a55e0d9acb3691c1a019c (diff)
downloadgitlab-ce-only-syntax.tar.gz
Fix testsonly-syntax
-rw-r--r--spec/lib/ci/gitlab_ci_yaml_processor_spec.rb26
1 files changed, 11 insertions, 15 deletions
diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
index a141a459ba3..9963f76f993 100644
--- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
@@ -123,18 +123,16 @@ module Ci
config = YAML.dump({
before_script: ["pwd"],
- build: { script: "build", type: "build", only: ["master", "deploy"] },
- rspec: { script: "rspec", type: type, only: ["master", "deploy"] },
+ rspec: { script: "rspec", type: "test", only: ["master", "deploy"] },
staging: { script: "deploy", type: "deploy", only: ["master", "deploy"] },
- production: { script: "deploy", type: "deploy", only: ["master", "deploy"] },
production: { script: "deploy", type: "deploy", only: ["master@path", "deploy"] },
})
- config_processor = GitlabCiYamlProcessor.new(config, path)
+ config_processor = GitlabCiYamlProcessor.new(config, 'fork')
- expect(config_processor.builds_for_stage_and_ref("production", "deploy").size).to eq(0)
- expect(config_processor.builds_for_stage_and_ref(type, "deploy").size).to eq(1)
expect(config_processor.builds_for_stage_and_ref("deploy", "deploy").size).to eq(2)
+ expect(config_processor.builds_for_stage_and_ref("test", "deploy").size).to eq(1)
+ expect(config_processor.builds_for_stage_and_ref("deploy", "master").size).to eq(1)
end
end
@@ -230,18 +228,16 @@ module Ci
it "returns build except specified type" do
config = YAML.dump({
before_script: ["pwd"],
- build: { script: "build", type: "build", except: ["master", "deploy"] },
- rspec: { script: "rspec", type: type, except: ["master", "deploy", "test@fork"] },
- staging: { script: "deploy", type: "deploy", except: ["master", "deploy"] },
- production: { script: "deploy", type: "deploy", except: ["master", "deploy"] },
- production: { script: "deploy", type: "deploy", except: ["master@path", "deploy"] },
+ rspec: { script: "rspec", type: "test", except: ["master", "deploy", "test@fork"] },
+ staging: { script: "deploy", type: "deploy", except: ["master"] },
+ production: { script: "deploy", type: "deploy", except: ["master@fork"] },
})
- config_processor = GitlabCiYamlProcessor.new(config, path)
+ config_processor = GitlabCiYamlProcessor.new(config, 'fork')
- expect(config_processor.builds_for_stage_and_ref("production", "deploy").size).to eq(0)
- expect(config_processor.builds_for_stage_and_ref(type, "test").size).to eq(1)
- expect(config_processor.builds_for_stage_and_ref("deploy", "master").size).to eq(2)
+ expect(config_processor.builds_for_stage_and_ref("deploy", "deploy").size).to eq(2)
+ expect(config_processor.builds_for_stage_and_ref("test", "test").size).to eq(0)
+ expect(config_processor.builds_for_stage_and_ref("deploy", "master").size).to eq(0)
end
end