@@ -246,34 +246,6 @@ func (s *stateSuite) TestLoginMacaroonInvalidId(c *gc.C) {
246
246
c .Assert (err , gc .ErrorMatches , "interaction required but not possible" )
247
247
}
248
248
249
- func (s * stateSuite ) TestLoginTracksFacadeVersions (c * gc.C ) {
250
- apistate , tag , password := s .OpenAPIWithoutLogin (c )
251
- defer apistate .Close ()
252
- // We haven't called Login yet, so the Facade Versions should be empty
253
- c .Check (apistate .AllFacadeVersions (), gc .HasLen , 0 )
254
- err := apistate .Login (tag , password , "" , nil )
255
- c .Assert (err , jc .ErrorIsNil )
256
- // Now that we've logged in, AllFacadeVersions should be updated.
257
- allVersions := apistate .AllFacadeVersions ()
258
- c .Check (allVersions , gc .Not (gc .HasLen ), 0 )
259
- // For sanity checking, ensure that we have a v2 of the Client facade
260
- c .Assert (allVersions ["Client" ], gc .Not (gc .HasLen ), 0 )
261
- c .Check (allVersions ["Client" ][0 ], gc .Equals , 1 )
262
- }
263
-
264
- func (s * stateSuite ) TestAllFacadeVersionsSafeFromMutation (c * gc.C ) {
265
- allVersions := s .APIState .AllFacadeVersions ()
266
- clients := allVersions ["Client" ]
267
- origClients := make ([]int , len (clients ))
268
- copy (origClients , clients )
269
- // Mutating the dict should not affect the cached versions
270
- allVersions ["Client" ] = append (allVersions ["Client" ], 2597 )
271
- newVersions := s .APIState .AllFacadeVersions ()
272
- newClientVers := newVersions ["Client" ]
273
- c .Check (newClientVers , gc .DeepEquals , origClients )
274
- c .Check (newClientVers [len (newClientVers )- 1 ], gc .Not (gc .Equals ), 2597 )
275
- }
276
-
277
249
func (s * stateSuite ) TestBestFacadeVersion (c * gc.C ) {
278
250
c .Check (s .APIState .BestFacadeVersion ("Client" ), gc .Equals , 5 )
279
251
}
0 commit comments