add some tests for image discovery, flesh out boot process

This commit is contained in:
Josh Wolf
2021-06-10 14:42:13 -06:00
parent 4287dd643d
commit 541d774857
8 changed files with 167 additions and 66 deletions
+12 -3
View File
@@ -71,6 +71,8 @@ func (o *deployOpts) Run(packagePath string) error {
return err
}
d := v1alpha1.NewDriver(p.Spec.Driver.Kind)
b, err := bootstrap.NewBooter(tmpdir)
if err != nil {
return err
@@ -82,14 +84,21 @@ func (o *deployOpts) Run(packagePath string) error {
}
o.logger.Infof("Performing pre %s boot steps", p.Spec.Driver.Kind)
if err := b.PreBoot(ctx, d); err != nil {
return err
}
o.logger.Infof("Booting %s", p.Spec.Driver.Kind)
if err := b.Boot(ctx, d); err != nil {
return err
}
o.logger.Infof("Performing post %s boot steps", p.Spec.Driver.Kind)
if err := b.PostBoot(ctx, d); err != nil {
return err
}
o.logger.Infof("Success!")
_ = ctx
o.logger.Infof("Success! You can access the cluster with '/opt/hauler/bin/kubectl'")
return nil
}
@@ -1,13 +0,0 @@
apiVersion: hauler.cattle.io/v1alpha1
kind: Package
metadata:
creationTimestamp: null
name: test
spec:
driver:
kind: k3s
version: v1.21.1+k3s1
fleet:
version: 0.3.5
paths:
- ../../../testdata/rawmanifests