grim/convey

f8f38beb1f98
Parents 11ee6a9d8cac
Children 83977b4d7654
Gross hack to deal with an update in go-shellwords
--- a/loaders/bitbucket/loader_test.go Mon Sep 04 21:49:48 2017 -0500
+++ b/loaders/bitbucket/loader_test.go Mon Sep 04 22:17:44 2017 -0500
@@ -18,6 +18,8 @@
package bitbucket
import (
+ "fmt"
+
"github.com/aphistic/sweet"
. "github.com/onsi/gomega"
@@ -31,7 +33,7 @@
func (b *bitbucketSuite) TestLoaderSimple(t sweet.T) {
l := Loader{}
- data := []byte(`image: python:3
+ rawData := `image: python:3
pipelines:
default:
- step:
@@ -41,7 +43,9 @@
- find . -type d -iname __pycache__ -exec rm -rf {} \; || true
- pip install -r dev-requirements.txt
- flake8
- - PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests`)
+ - PYTHONPATH=%s py.test --color=auto --cov=pipelines --cov-report=term-missing tests`
+
+ data := []byte(fmt.Sprintf(rawData, "`pwd`"))
cfg, err := l.Load("", "", data)
@@ -61,7 +65,7 @@
"find . -type d -iname __pycache__ -exec rm -rf {} \\; || true",
"pip install -r dev-requirements.txt",
"flake8",
- "PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
+ "PYTHONPATH=`pwd` py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
},
Shell: "/bin/sh",
},
@@ -88,7 +92,7 @@
func (b *bitbucketSuite) TestLoaderComplexGlobalImage(t sweet.T) {
l := Loader{}
- data := []byte(`image:
+ rawData := `image:
name: python:3
pipelines:
default:
@@ -99,7 +103,9 @@
- find . -type d -iname __pycache__ -exec rm -rf {} \; || true
- pip install -r dev-requirements.txt
- flake8
- - PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests`)
+ - PYTHONPATH=%s py.test --color=auto --cov=pipelines --cov-report=term-missing tests`
+
+ data := []byte(fmt.Sprintf(rawData, "`pwd`"))
cfg, err := l.Load("", "", data)
@@ -119,7 +125,7 @@
"find . -type d -iname __pycache__ -exec rm -rf {} \\; || true",
"pip install -r dev-requirements.txt",
"flake8",
- "PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
+ "PYTHONPATH=`pwd` py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
},
Shell: "/bin/sh",
},
@@ -146,7 +152,7 @@
func (b *bitbucketSuite) TestLoaderComplexGlobalImageWithLogin(t sweet.T) {
l := Loader{}
- data := []byte(`image:
+ rawData := `image:
name: registry.docker.io/python:3
username: foo
password: bar
@@ -160,7 +166,9 @@
- find . -type d -iname __pycache__ -exec rm -rf {} \; || true
- pip install -r dev-requirements.txt
- flake8
- - PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests`)
+ - PYTHONPATH=%s py.test --color=auto --cov=pipelines --cov-report=term-missing tests`
+
+ data := []byte(fmt.Sprintf(rawData, "`pwd`"))
cfg, err := l.Load("", "", data)
@@ -185,7 +193,7 @@
"find . -type d -iname __pycache__ -exec rm -rf {} \\; || true",
"pip install -r dev-requirements.txt",
"flake8",
- "PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
+ "PYTHONPATH=`pwd` py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
},
Shell: "/bin/sh",
},
@@ -215,7 +223,7 @@
func (b *bitbucketSuite) TestLoaderComplexStepImage(t sweet.T) {
l := Loader{}
- data := []byte(`pipelines:
+ rawData := `pipelines:
default:
- step:
image:
@@ -226,7 +234,9 @@
- find . -type d -iname __pycache__ -exec rm -rf {} \; || true
- pip install -r dev-requirements.txt
- flake8
- - PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests`)
+ - PYTHONPATH=%s py.test --color=auto --cov=pipelines --cov-report=term-missing tests`
+
+ data := []byte(fmt.Sprintf(rawData, "`pwd`"))
cfg, err := l.Load("", "", data)
@@ -246,7 +256,7 @@
"find . -type d -iname __pycache__ -exec rm -rf {} \\; || true",
"pip install -r dev-requirements.txt",
"flake8",
- "PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
+ "PYTHONPATH=`pwd` py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
},
Shell: "/bin/sh",
},
@@ -273,7 +283,7 @@
func (b *bitbucketSuite) TestLoaderComplexStepImageWithLogin(t sweet.T) {
l := Loader{}
- data := []byte(`pipelines:
+ rawData := `pipelines:
default:
- step:
image:
@@ -286,7 +296,9 @@
- find . -type d -iname __pycache__ -exec rm -rf {} \; || true
- pip install -r dev-requirements.txt
- flake8
- - PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests`)
+ - PYTHONPATH=%s py.test --color=auto --cov=pipelines --cov-report=term-missing tests`
+
+ data := []byte(fmt.Sprintf(rawData, "`pwd`"))
cfg, err := l.Load("", "", data)
@@ -311,7 +323,7 @@
"find . -type d -iname __pycache__ -exec rm -rf {} \\; || true",
"pip install -r dev-requirements.txt",
"flake8",
- "PYTHONPATH=$(pwd) py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
+ "PYTHONPATH=`pwd` py.test --color=auto --cov=pipelines --cov-report=term-missing tests",
},
Shell: "/bin/sh",
},