(t *testing.T)
| 67 | } |
| 68 | |
| 69 | func initExecKubeAMI(t *testing.T) *kubeImpl { |
| 70 | fc := fake.NewSimpleClientset(genExecRuntime()...) |
| 71 | cli := client{ |
| 72 | core: fc.CoreV1(), |
| 73 | app: fc.AppsV1(), |
| 74 | } |
| 75 | f, err := os.CreateTemp("", t.Name()) |
| 76 | assert.NoError(t, err) |
| 77 | assert.NotNil(t, f) |
| 78 | fmt.Println("-->tempfile", f.Name()) |
| 79 | sto, err := store.NewBoltHold(f.Name()) |
| 80 | assert.NoError(t, err) |
| 81 | assert.NotNil(t, sto) |
| 82 | ami.Hooks[BaetylSetPodSpec] = SetPodSpecFunc(SetPodSpec) |
| 83 | return &kubeImpl{cli: &cli, store: sto, knn: "node1", log: log.With()} |
| 84 | } |
| 85 | |
| 86 | func TestUpdateNodeLabels(t *testing.T) { |
| 87 | am := initExecKubeAMI(t) |
no test coverage detected