Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lmp/jobserv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ triggers:
persistent-volumes:
bitbake: /var/cache/bitbake

- name: build-lmp-base-{loop}
- name: build-lmp-base-{loop}
container: hub.foundries.io/lmp-sdk
host-tag: amd64-partner-gcp-nocache
loop-on:
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
requests==2.32.5
requests-mock==1.8.0
PyYAML==6.0.1
expandvars==0.6.5
Expand Down
26 changes: 26 additions & 0 deletions tests/test_jobserv_schema.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (c) 2020 Foundries.io
# SPDX-License-Identifier: BSD-3-Clause

import os
import sys
import unittest

import requests
import yaml


class JobservSchemaTest(unittest.TestCase):
def test_schema(self):
here = os.path.abspath(__file__)
root = os.path.dirname(os.path.dirname(here))

paths = ("lmp/jobserv.yml", "factory-containers/jobserv.yml")
for p in paths:
with open(os.path.join(root, p)) as f:
data = yaml.safe_load(f)
r = requests.post("https://api.foundries.io/simulator-validate", json=data)
if r.status_code != 200:
try:
sys.exit(r.json()['message'])
except Exception:
sys.exit(r.text)
2 changes: 1 addition & 1 deletion unit-test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -e
#!/bin/bash -e

VENV_DIR=$(mktemp -d -p $PWD)
python3 -m venv "${VENV_DIR}"
Expand Down