...

  • .StorageLayer() always points to the storage layer inside TestServer.

  • .SystemLayer() always points to the special system interface inside TestServer (previously known as “system tenant” in previous versions of CockroachDB).

...

Temporary API pitfall and misdesign

As of this writing, TestServerInterface also contains the following:

Code Block
languagego

...

type TestServerInterface interface {
  

...

...
  

...

// 

...

ApplicationLayerInterface 

...

is 

...

implemented 

...

by TestServerInterface
  

...

// for 

...

backward-compatibility 

...

with 

...

existing test code.
  

...

//
  

...

// 

...

It 

...

is 

...

CURRENTLY 

...

equivalent to

...

 

...

.

...

SystemLayer() 

...

however
  // 

...

this 

...

results 

...

in 

...

poor 

...

test semantics.
  

...

//
  // 

...

New 

...

tests 

...

should 

...

spell 

...

out 

...

their 

...

intent 

...

clearly 

...

by calling
  // 

...

the .ApplicationLayer() (preferred) or .SystemLayer() methods directly.
  

...

ApplicationLayerInterface
  ...
}