Skip to content

Commit c07ad53

Browse files
committed
add test script for rename api and add k8s config file
1 parent d75eaa1 commit c07ad53

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

gitconvex-k8s.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: gitconvex
5+
spec:
6+
replicas: 3
7+
selector:
8+
matchLabels:
9+
app: gitconvex
10+
template:
11+
metadata:
12+
labels:
13+
app: gitconvex
14+
spec:
15+
containers:
16+
- name: gitconvex
17+
image: itassistors/gitconvex
18+
resources:
19+
limits:
20+
memory: "128Mi"
21+
cpu: "500m"
22+
ports:
23+
- containerPort: 9001

tests/update_repo_name_test.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package tests
2+
3+
import (
4+
"github.com/neel1996/gitconvex-server/api"
5+
"testing"
6+
)
7+
8+
func TestUpdateRepoName(t *testing.T) {
9+
type args struct {
10+
repoId string
11+
repoName string
12+
}
13+
tests := []struct {
14+
name string
15+
args args
16+
want string
17+
wantErr bool
18+
}{
19+
// TODO: Add test cases.
20+
}
21+
for _, tt := range tests {
22+
t.Run(tt.name, func(t *testing.T) {
23+
got, err := api.UpdateRepoName(tt.args.repoId, tt.args.repoName)
24+
if (err != nil) != tt.wantErr {
25+
t.Errorf("UpdateRepoName() error = %v, wantErr %v", err, tt.wantErr)
26+
return
27+
}
28+
if got != tt.want {
29+
t.Errorf("UpdateRepoName() got = %v, want %v", got, tt.want)
30+
}
31+
})
32+
}
33+
}

0 commit comments

Comments
 (0)