mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-09 14:41:31 +02:00
fix: update the way results are retrieved for certified conformance
Looks like we bumped sonobuoy library, and it silently changed a lot of things in the way it works with the results. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
parent
a059454045
commit
a1c9d64907
@ -248,7 +248,14 @@ func Run(ctx context.Context, cluster cluster.K8sProvider, options *Options) err
|
||||
return fmt.Errorf("no result reader")
|
||||
}
|
||||
|
||||
tarR := tar.NewReader(resultR)
|
||||
gzipR, err := gzip.NewReader(resultR)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer gzipR.Close() //nolint:errcheck
|
||||
|
||||
tarR := tar.NewReader(gzipR)
|
||||
|
||||
for {
|
||||
var header *tar.Header
|
||||
@ -262,22 +269,22 @@ func Run(ctx context.Context, cluster cluster.K8sProvider, options *Options) err
|
||||
return err
|
||||
}
|
||||
|
||||
matched, _ := filepath.Match("tmp/sonobuoy/*_sonobuoy_*.tar.gz", header.Name) //nolint:errcheck
|
||||
matched, _ := filepath.Match("*_sonobuoy_*.tar.gz", header.Name) //nolint:errcheck
|
||||
|
||||
if !matched {
|
||||
continue
|
||||
}
|
||||
|
||||
var gzipR *gzip.Reader
|
||||
var innerGzipR *gzip.Reader
|
||||
|
||||
gzipR, err = gzip.NewReader(tarR)
|
||||
innerGzipR, err = gzip.NewReader(tarR)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer gzipR.Close() //nolint:errcheck
|
||||
defer innerGzipR.Close() //nolint:errcheck
|
||||
|
||||
innnerTarR := tar.NewReader(gzipR)
|
||||
innnerTarR := tar.NewReader(innerGzipR)
|
||||
|
||||
for {
|
||||
header, err = innnerTarR.Next()
|
||||
@ -315,7 +322,9 @@ func Run(ctx context.Context, cluster cluster.K8sProvider, options *Options) err
|
||||
|
||||
select {
|
||||
case err = <-errCh:
|
||||
return err
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user