Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Sep 4, 2023
1 parent b9a5073 commit 5c48b03
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/apiserver-impl/devstate/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ components:
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{
{
Name: "an-exec-command",
Expand Down Expand Up @@ -183,6 +184,7 @@ components:
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{
{
Name: "an-apply-command",
Expand Down Expand Up @@ -311,6 +313,7 @@ components:
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{
{
Name: "an-exec-command",
Expand Down Expand Up @@ -440,6 +443,7 @@ func TestDevfileState_DeleteCommand(t *testing.T) {
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{
{
Expand Down Expand Up @@ -655,6 +659,7 @@ func TestDevfileState_MoveCommand(t *testing.T) {
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{
{
Name: "an-exec-command",
Expand Down Expand Up @@ -742,6 +747,7 @@ func TestDevfileState_SetDefaultCommand(t *testing.T) {
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{
{
Name: "an-exec-command",
Expand Down Expand Up @@ -831,6 +837,7 @@ func TestDevfileState_UnsetDefaultCommand(t *testing.T) {
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{
{
Name: "an-exec-command",
Expand Down
10 changes: 10 additions & 0 deletions pkg/apiserver-impl/devstate/components_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func TestDevfileState_AddContainer(t *testing.T) {
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{
{
Expand Down Expand Up @@ -150,6 +151,7 @@ schemaVersion: 2.2.0
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{
{
Expand Down Expand Up @@ -243,6 +245,7 @@ func TestDevfileState_DeleteContainer(t *testing.T) {
Content: `metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down Expand Up @@ -349,6 +352,7 @@ func TestDevfileState_AddImage(t *testing.T) {
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{
Expand Down Expand Up @@ -424,6 +428,7 @@ func TestDevfileState_DeleteImage(t *testing.T) {
Content: `metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down Expand Up @@ -507,6 +512,7 @@ func TestDevfileState_AddResource(t *testing.T) {
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down Expand Up @@ -539,6 +545,7 @@ schemaVersion: 2.2.0
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down Expand Up @@ -607,6 +614,7 @@ func TestDevfileState_Deleteresource(t *testing.T) {
Content: `metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down Expand Up @@ -688,6 +696,7 @@ func TestDevfileState_AddVolume(t *testing.T) {
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down Expand Up @@ -753,6 +762,7 @@ func TestDevfileState_DeleteVolume(t *testing.T) {
Content: `metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down
1 change: 1 addition & 0 deletions pkg/apiserver-impl/devstate/content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestDevfileState_GetContent(t *testing.T) {
},
want: DevfileContent{
Content: "metadata: {}\nschemaVersion: 2.2.0\n",
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down
2 changes: 2 additions & 0 deletions pkg/apiserver-impl/devstate/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestDevfileState_UpdateEvents(t *testing.T) {
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down Expand Up @@ -67,6 +68,7 @@ schemaVersion: 2.2.0
metadata: {}
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down
1 change: 1 addition & 0 deletions pkg/apiserver-impl/devstate/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func TestDevfileState_SetMetadata(t *testing.T) {
website: http://example.com
schemaVersion: 2.2.0
`,
Version: "2.2.0",
Commands: []Command{},
Containers: []Container{},
Images: []Image{},
Expand Down

0 comments on commit 5c48b03

Please sign in to comment.