Skip to content

Commit

Permalink
let integrationtest cover dcron
Browse files Browse the repository at this point in the history
  • Loading branch information
dxyinme committed Aug 19, 2024
1 parent 6370c75 commit b4d87f2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.idea/*
bin/
coverage.txt
coverage.html
coverage.html
cov/
3 changes: 3 additions & 0 deletions integrationtest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
main
integrationtest
cov/
2 changes: 1 addition & 1 deletion integrationtest/dcron_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package integrationtest
package main

import (
"fmt"
Expand Down
5 changes: 3 additions & 2 deletions integrationtest/inode_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package integrationtest
package main

import (
"context"
Expand All @@ -20,6 +20,7 @@ import (
"go.etcd.io/etcd/tests/v3/integration"
)

type Te struct{}
type testINodePoolSuite struct {
suite.Suite

Expand Down Expand Up @@ -174,7 +175,7 @@ func (ts *testINodePoolSuite) TestCheckJobAvailableFailedWithNodePoolRingIsNil()
ts.Equal(dcron.ErrNodePoolIsNil, err)
}

func TestTestINodePoolSuite(t *testing.T) {
func TestINodePoolTestSuite(t *testing.T) {
s := new(testINodePoolSuite)
suite.Run(t, s)
}
5 changes: 5 additions & 0 deletions integrationtest/run-integrationtest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#/bin/bash

mkdir -p cov
rm -rf cov/*
go test -v --coverprofile=cov/cover-dcron-integration.out -covermode=atomic -timeout=30m -coverpkg=github.com/libi/dcron github.com/libi/dcron/integrationtest

0 comments on commit b4d87f2

Please sign in to comment.