-
Notifications
You must be signed in to change notification settings - Fork 1
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
10 changed files
with
141 additions
and
41 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Eureka | ||
author: xyz@jiggy.dev | ||
description: This is a passing JiggyPlaybook | ||
version: 0.0.1 | ||
|
||
pipeline: | ||
runner: sequential | ||
secrets: | ||
location: ../examples/secrets/.env-example | ||
source: jiggy.EnvSecrets | ||
tasks: | ||
|
||
- name: print-somethin | ||
description: Print something | ||
function: | ||
source: jpl.rules.pipeline.pipeline.PipelineHasRunner | ||
params: | ||
- type: str | ||
value: 'THIS PIPELINE IS BONKERS' | ||
output: null | ||
requires: null |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"""Configuration for CLI.""" | ||
|
||
################ | ||
# CLICK COLORS # | ||
################ | ||
|
||
MARK_TO_COLOR = { | ||
"PASSED": "green", | ||
"WARNING": "yellow", | ||
"FAILED": "red" | ||
} |
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
Empty file.
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,72 @@ | ||
"""Integration test modules.""" | ||
import pytest | ||
|
||
from unittest import TestCase | ||
|
||
from jpl import JiggyPlaybookLint | ||
|
||
|
||
class TestJiggyPlaybookLintEmpty(TestCase): | ||
"""Integration test client (empty).""" | ||
def setUp(self): | ||
"""Build JiggyPlaybookLintClient.""" | ||
self.empty_jpl = JiggyPlaybookLint( | ||
path="../examples/jiggy-playbook-empty.yml" | ||
) | ||
|
||
def test_validate(self): | ||
"""Emptry TestCase for jpl.""" | ||
validity_result, jpl_response = self.empty_jpl.validate() | ||
|
||
assert validity_result is False | ||
assert len(jpl_response) == 1 | ||
|
||
|
||
class TestJiggyPlaybookLintPassing(TestCase): | ||
"""Integration test client (passing).""" | ||
def setUp(self): | ||
"""Build JiggyPlaybookLintClient.""" | ||
self.passing_jpl = JiggyPlaybookLint( | ||
path="../examples/jiggy-playbook-passing.yml" | ||
) | ||
|
||
def test_validate(self): | ||
"""Passing TestCase for jpl.""" | ||
validity_result, jpl_response = self.passing_jpl.validate() | ||
|
||
assert validity_result is True | ||
assert not jpl_response | ||
|
||
|
||
class TestJiggyPlaybookLintBasic(TestCase): | ||
"""Integration test client (basic).""" | ||
def setUp(self): | ||
"""Build JiggyPlaybookLintClient.""" | ||
self.basic_jpl = JiggyPlaybookLint( | ||
path="../examples/jiggy-playbook.yml", | ||
allow_warning=False, | ||
) | ||
|
||
def test_validate(self): | ||
"""Basic TestCase for jpl.""" | ||
validity_result, jpl_response = self.basic_jpl.validate() | ||
|
||
assert validity_result is False | ||
assert len(jpl_response) == 7 | ||
|
||
|
||
class TestJiggyPlaybookLintComplex(TestCase): | ||
"""Integration test client (basic).""" | ||
def setUp(self): | ||
"""Build JiggyPlaybookLintClient.""" | ||
self.complex_jpl = JiggyPlaybookLint( | ||
path="../examples/jiggy-playbook-flawed.yml", | ||
allow_warning=False, | ||
) | ||
|
||
def test_validate(self): | ||
"""Basic TestCase for jpl.""" | ||
validity_result, jpl_response = self.complex_jpl.validate() | ||
|
||
assert validity_result is False | ||
assert len(jpl_response) == 15 |
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