@@ -12,8 +12,6 @@ import (
12
12
"github.com/stretchr/testify/suite"
13
13
14
14
"github.com/G-Research/fasttrackml/pkg/api/aim/response"
15
- "github.com/G-Research/fasttrackml/pkg/api/mlflow/common"
16
- "github.com/G-Research/fasttrackml/pkg/api/mlflow/dao/models"
17
15
"github.com/G-Research/fasttrackml/pkg/database"
18
16
"github.com/G-Research/fasttrackml/tests/integration/golang/helpers"
19
17
)
@@ -27,25 +25,14 @@ func TestDeleteAppTestSuite(t *testing.T) {
27
25
}
28
26
29
27
func (s * DeleteAppTestSuite ) Test_Ok () {
30
- defer func () {
31
- s .Require ().Nil (s .NamespaceFixtures .UnloadFixtures ())
32
- }()
33
-
34
- namespace , err := s .NamespaceFixtures .CreateNamespace (context .Background (), & models.Namespace {
35
- ID : 1 ,
36
- Code : "default" ,
37
- DefaultExperimentID : common .GetPointer (int32 (0 )),
38
- })
39
- s .Require ().Nil (err )
40
-
41
28
app , err := s .AppFixtures .CreateApp (context .Background (), & database.App {
42
29
Base : database.Base {
43
30
ID : uuid .New (),
44
31
CreatedAt : time .Now (),
45
32
},
46
33
Type : "mpi" ,
47
34
State : database.AppState {},
48
- NamespaceID : namespace .ID ,
35
+ NamespaceID : s . DefaultNamespace .ID ,
49
36
})
50
37
s .Require ().Nil (err )
51
38
@@ -75,25 +62,14 @@ func (s *DeleteAppTestSuite) Test_Ok() {
75
62
}
76
63
77
64
func (s * DeleteAppTestSuite ) Test_Error () {
78
- defer func () {
79
- s .Require ().Nil (s .NamespaceFixtures .UnloadFixtures ())
80
- }()
81
-
82
- namespace , err := s .NamespaceFixtures .CreateNamespace (context .Background (), & models.Namespace {
83
- ID : 1 ,
84
- Code : "default" ,
85
- DefaultExperimentID : common .GetPointer (int32 (0 )),
86
- })
87
- s .Require ().Nil (err )
88
-
89
- _ , err = s .AppFixtures .CreateApp (context .Background (), & database.App {
65
+ _ , err := s .AppFixtures .CreateApp (context .Background (), & database.App {
90
66
Base : database.Base {
91
67
ID : uuid .New (),
92
68
CreatedAt : time .Now (),
93
69
},
94
70
Type : "mpi" ,
95
71
State : database.AppState {},
96
- NamespaceID : namespace .ID ,
72
+ NamespaceID : s . DefaultNamespace .ID ,
97
73
})
98
74
s .Require ().Nil (err )
99
75
0 commit comments