Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Issue 80: Modified the test framework for tink repo #177

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 4 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ steps:
- name: test
image: golang:1.13-alpine3.11
commands:
- CGO_ENABLED=0 go test -v ./...
- apk add --update make
- apk add docker
- apk add docker-compose
- CGO_ENABLED=0 make test

- name: ci-checks
image: nixos/nix:2.3.4
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ require (
github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec // indirect
github.com/spf13/pflag v1.0.1 // indirect
github.com/spf13/viper v1.0.2
github.com/stretchr/testify v1.3.0
go.mongodb.org/mongo-driver v1.1.2 // indirect
go.uber.org/atomic v1.2.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
Expand Down
158 changes: 0 additions & 158 deletions test-docker-compose.yml

This file was deleted.

5 changes: 1 addition & 4 deletions test/actions/update_data/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FROM bash
ADD hello_world.sh /bin/hello_world.sh
RUN chmod +x /bin/hello_world.sh
#CMD echo '{"action_01": "data_01"}' > /workflow/data
ENTRYPOINT [ "/bin/hello_world.sh" ]
CMD echo '{"action_01": "data_01"}' > /workflow/data
128 changes: 23 additions & 105 deletions test/data/hardware/hardware_1.json
Original file line number Diff line number Diff line change
@@ -1,112 +1,30 @@
{
"allow_pxe": true,
"arch": "x86_64",
"bonding_mode": 4,
"efi_boot": true,
"facility_code": "ewr1",
"id": "f9f56dff-098a-4c5f-a51c-19ad35de85d1",
"instance": {
"allow_pxe": true,
"always_pxe": true,
"customdata": {},
"hostname": "sample-machine",
"id": "3b2cccf1-1906-4d82-9fe0-c6d5188e70eb",
"ip_addresses": [],
"ipxe_script_url": "https://boot.netboot.xyz",
"network_ready": false,
"operating_system_version": {
"distro": "custom_ipxe",
"image_tag": null,
"os_slug": "custom_ipxe",
"slug": "custom_ipxe",
"version": "1"
"metadata": {
"facility": {
"facility_code": "onprem"
},
"project": {},
"rescue": false,
"ssh_keys": [],
"state": "active",
"storage": {},
"tags": [],
"userdata": ""
"instance": {},
"state": ""
},
"ip_addresses": [
{
"address": "172.24.7.50",
"address_family": 4,
"cidr": 30,
"enabled": true,
"gateway": "172.24.7.49",
"management": true,
"netmask": "255.255.255.252",
"network": "172.24.7.48",
"public": false,
"type": "data"
},
{
"address": "10.250.42.38",
"gateway": "10.250.42.1",
"netmask": "255.255.255.0",
"type": "ipmi"
}
],
"management": {
"address": "10.250.42.38",
"gateway": "10.250.42.1",
"netmask": "255.255.255.0",
"type": "ipmi"
},
"manufacturer": {
"id": "5c6dc6d1-0b75-4e77-811e-e2d3b4e5312a",
"slug": "dell"
},
"network_ports": [
{
"connected_ports": [
{
"data": {
"bond": null,
"mac": null
"network": {
"interfaces": [
{
"dhcp": {
"arch": "x86_64",
"ip": {
"address": "192.168.1.5",
"gateway": "192.168.1.1",
"netmask": "255.255.255.248"
},
"hostname": "",
"id": "421f34e5-b141-4c4a-8234-239996bf7a1a",
"name": "xe-0/0/28",
"type": "data"
"mac": "98:03:9b:89:d7:ba",
"uefi": false
},
"netboot": {
"allow_pxe": true,
"allow_workflow": true
}
],
"data": {
"bond": null,
"mac": "98:03:9b:89:d7:ba"
},
"id": "213394d4-8642-443d-9140-c625cfaeb354",
"name": "eth0",
"type": "data"
},
{
"connected_ports": [],
"data": {
"bond": null,
"mac": "98:03:9b:89:d7:bb"
},
"id": "da245720-aa41-4368-9eca-7fb5af8bd492",
"name": "eth1",
"type": "data"
},
{
"connected_ports": [],
"data": {
"bond": null,
"mac": "4c:d9:8f:42:21:f3"
},
"id": "b1b7c29c-41d0-479d-9dbc-392250b8b36f",
"name": "ipmi0",
"type": "ipmi"
}
],
"plan_slug": "c2.medium.x86",
"plan_version_slug": "c2.medium.x86.01",
"preinstalled_operating_system_version": {},
"services": {},
"state": "in_use",
"type": "server",
"vlan_id": null
}
]
}
}
Loading