Skip to content

Commit

Permalink
delete CI env
Browse files Browse the repository at this point in the history
Signed-off-by: YZ775 <yuzuki-mimura@cybozu.co.jp>
  • Loading branch information
YZ775 committed Oct 31, 2023
1 parent 98c5448 commit 484b47c
Show file tree
Hide file tree
Showing 2 changed files with 1,097 additions and 15 deletions.
16 changes: 1 addition & 15 deletions models/etcd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ const (
)

func testMain(m *testing.M) int {
ci := os.Getenv("CI") == "true"
if ci {
code := m.Run()
os.Exit(code)
}

etcdDataDir, err := os.MkdirTemp("", "sabakan-test")
if err != nil {
log.ErrorExit(err)
Expand Down Expand Up @@ -60,16 +54,8 @@ func TestMain(m *testing.M) {
}

func newEtcdClient(prefix string) (*clientv3.Client, error) {
var clientURL string
ci := os.Getenv("CI") == "true"
if ci {
clientURL = "http://localhost:2379"
} else {
clientURL = etcdClientURL
}

cfg := etcdutil.NewConfig(prefix)
cfg.Endpoints = []string{clientURL}
cfg.Endpoints = []string{etcdClientURL}
return etcdutil.NewClient(cfg)
}

Expand Down
Loading

0 comments on commit 484b47c

Please sign in to comment.