Skip to content

Commit

Permalink
Adding unit-tests
Browse files Browse the repository at this point in the history
fabi200123 committed May 20, 2024
1 parent 6ab68c8 commit e067ade
Showing 431 changed files with 11,130 additions and 3,830 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Go Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
go-tests-linux:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version-file: go.mod

- run: go version

- name: Run GARM Go Tests
run: make go-test

go-tests-windows:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version-file: go.mod

- run: go version

- name: Run GARM Go Tests
run: go test -tags testing -v ./... -timeout=15m -parallel=4
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -66,15 +66,19 @@ To this end, this provider supports the following extra specs schema:
},
"enable_boot_debug": {
"type": "boolean",
"description": "Enable cloud-init debug mode. Adds `set -x` into the cloud-init script."
"description": "Enable cloud-init debug mode. Adds 'set -x' into the cloud-init script."
},
"allow_image_owners": {
"allowed_image_owners": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of image owners to allow when creating the instance. If not specified, all images will be allowed."
}
},
"image_visibility": {
"type": "string",
"description": "The visibility of the image to use."
}
},
"additionalProperties": false
}
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
@@ -450,7 +450,7 @@ func (o *OpenstackClient) StartServer(nameOrID string) error {
}

if err := startstop.Start(o.compute, srv.ID).ExtractErr(); err != nil {
return fmt.Errorf("failed to stop server: %w", err)
return fmt.Errorf("failed to start server: %w", err)
}

return nil
Loading

0 comments on commit e067ade

Please sign in to comment.