Review of platform detection (#56)

* Leave default image platform empty for static provider (see FAQ doc)
* Handle platform variant
* Add database migration process
* Switch to Open Container Specification labels as label-schema.org ones are deprecated
* Remove unneeded `diun.os` and `diun.arch` docker labels

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2020-03-31 23:27:10 +02:00
committed by GitHub
parent 2893414f59
commit 9c797f1616
28 changed files with 661 additions and 221 deletions

View File

@@ -0,0 +1,28 @@
package registry_test
import (
"os"
"testing"
"github.com/crazy-max/diun/pkg/registry"
"github.com/stretchr/testify/assert"
)
var (
rc *registry.Client
)
func TestMain(m *testing.M) {
var err error
rc, err = registry.New(registry.Options{})
if err != nil {
panic(err.Error())
}
os.Exit(m.Run())
}
func TestNew(t *testing.T) {
assert.NotNil(t, rc)
}