-
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.
Merge pull request #2 from tsladecek/1-tests
1 tests
- Loading branch information
Showing
19 changed files
with
525 additions
and
15 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,22 @@ | ||
name: Basic Testing of package functionality | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pipenv | ||
pipenv sync --dev --system | ||
- name: Run Tests | ||
run: pytest --disable-warnings |
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ examples/out/*.yml | |
examples/out/*.json | ||
out/ | ||
dist/ | ||
*egg-info* | ||
*egg-info* | ||
*.pytest_cache* |
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 @@ | ||
exclude src/ksux/tests |
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 |
---|---|---|
|
@@ -8,6 +8,8 @@ pydantic = "*" | |
"ruamel.yaml" = "*" | ||
|
||
[dev-packages] | ||
pytest = "*" | ||
autopep8 = "*" | ||
|
||
[requires] | ||
python_version = "3.8" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,10 @@ | ||
import pathlib | ||
|
||
from pydantic import BaseSettings | ||
|
||
|
||
class Settings(BaseSettings): | ||
PARENT = pathlib.Path(__file__).parent.resolve() | ||
|
||
|
||
settings = Settings() |
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,28 @@ | ||
[ | ||
{ | ||
"name": "configmap_patch", | ||
"target": { | ||
"apiVersion": "v1", | ||
"kind": "ConfigMap", | ||
"name": "web" | ||
}, | ||
"ops": [ | ||
{ | ||
"name": "add_key", | ||
"path": "/data", | ||
"action": "add", | ||
"value": { | ||
"Tyger_tyger": "burning_bright", | ||
"in_the_forests": "of_the_night", | ||
"what_immortal": "hand_or_eye", | ||
"could_frame": "thy_fearful_symmetry" | ||
} | ||
}, | ||
{ | ||
"name": "add_key", | ||
"path": "/data/key1", | ||
"action": "remove" | ||
} | ||
] | ||
} | ||
] |
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,33 @@ | ||
--- | ||
name: deployment_patches | ||
target: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: web | ||
ops: | ||
- name: replace_image | ||
path: /spec/template/spec/containers/nginx/image | ||
value: nginx:1.23 | ||
action: replace | ||
--- | ||
name: deployment_patches | ||
target: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: web | ||
ops: | ||
- name: replace label | ||
path: /metadata/labels/app | ||
value: new-label | ||
action: replace | ||
--- | ||
name: deployment_patches | ||
target: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: web-2 | ||
ops: | ||
- name: replace_image | ||
path: /spec/template/spec/containers/nginx/image | ||
value: nginx:1.20 | ||
action: replace |
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,18 @@ | ||
- name: service_patches | ||
target: | ||
apiVersion: v1 | ||
kind: Service | ||
name: nginx-service | ||
ops: | ||
- name: add_https_port | ||
path: /spec/ports | ||
value: | ||
name: https | ||
port: 443 | ||
protocol: TCP | ||
targetPort: 443 | ||
action: add | ||
- name: rename_http_port | ||
path: /spec/ports/http/name | ||
action: replace | ||
value: new_name |
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,28 @@ | ||
{ | ||
"kind": "Service", | ||
"apiVersion": "v1", | ||
"metadata": { | ||
"name": "svc", | ||
"creationTimestamp": null, | ||
"labels": { | ||
"app": "svc" | ||
} | ||
}, | ||
"spec": { | ||
"ports": [ | ||
{ | ||
"name": "80-80", | ||
"protocol": "TCP", | ||
"port": 80, | ||
"targetPort": 80 | ||
} | ||
], | ||
"selector": { | ||
"app": "svc" | ||
}, | ||
"type": "ClusterIP" | ||
}, | ||
"status": { | ||
"loadBalancer": {} | ||
} | ||
} |
Oops, something went wrong.