-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
10 additions
and
67 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FROM alpine:3.5 | ||
COPY opt /opt | ||
RUN apk -Uuv add groff less python3 && \ | ||
RUN apk -Uuv add groff less python3 git && \ | ||
pip3 install -r /opt/requirements.txt && \ | ||
rm /var/cache/apk/* |
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 +1 @@ | ||
jsonschema==2.6.0 | ||
git+https://github.com/cosee-concourse/concourse-common.git |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,28 +1,28 @@ | ||
import unittest | ||
import input | ||
from unittest.mock import patch | ||
from concourse_common import test_common | ||
from concourse_common import testutil | ||
import json | ||
|
||
class TestInput(unittest.TestCase): | ||
|
||
@patch("input.file_io") | ||
def test_call_to_fileIO(self, mock_io): | ||
test = "test/test" | ||
test_common.put_stdin(json.dumps({"source": {"prefix": "test"}, "version": {"version": "1.1.0"}})) | ||
testutil.put_stdin(json.dumps({"source": {"prefix": "test"}, "version": {"version": "1.1.0"}})) | ||
input.execute(test) | ||
mock_io.write_to_file.assert_any_call(test + "/default", "test_1_1_0") | ||
mock_io.write_to_file.assert_any_call(test + "/heroku", "test-1-1-0") | ||
|
||
def test_invalid_prefix(self): | ||
test = "test/test" | ||
test_common.put_stdin(json.dumps({"source": {"prefix": "tes2234"}, "version": {"version": "1.1.0"}})) | ||
testutil.put_stdin(json.dumps({"source": {"prefix": "tes2234"}, "version": {"version": "1.1.0"}})) | ||
self.assertEquals(input.execute(test), -1) | ||
|
||
@patch("input.file_io") | ||
@patch("input.json") | ||
def test_call_to_json(self, mock_io, mock_io2): | ||
test = "test/test" | ||
test_common.put_stdin(json.dumps({"source": {"prefix": "test"}, "version": {"version": "1.1.0"}})) | ||
testutil.put_stdin(json.dumps({"source": {"prefix": "test"}, "version": {"version": "1.1.0"}})) | ||
input.execute(test) | ||
mock_io.dumps.assert_any_call({"version": {"version": "1.1.0"}}) |
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