Make plugin dir match Go conventions.

This commit is contained in:
jregan
2019-04-23 23:16:23 -07:00
parent 0ac48f60a5
commit cfb0c5efad
16 changed files with 29 additions and 12 deletions

View File

@@ -36,6 +36,7 @@ func TestCompiler(t *testing.T) {
if configRoot != c.ObjRoot() {
t.Errorf("unexpected objRoot %s", c.ObjRoot())
}
expectObj := filepath.Join(
c.ObjRoot(),
"someteam.example.com", "v1", "DatePrefixer.so")
@@ -49,6 +50,21 @@ func TestCompiler(t *testing.T) {
if !RecentFileExists(expectObj) {
t.Errorf("didn't find expected obj file %s", expectObj)
}
expectObj = filepath.Join(
c.ObjRoot(),
"builtin", "", "SecretGenerator.so")
if FileExists(expectObj) {
t.Errorf("obj file should not exist yet: %s", expectObj)
}
err = c.Compile("builtin", "", "SecretGenerator")
if err != nil {
t.Error(err)
}
if !RecentFileExists(expectObj) {
t.Errorf("didn't find expected obj file %s", expectObj)
}
err = os.RemoveAll(c.ObjRoot())
if err != nil {
t.Errorf(