Expect compiled .ncs
This commit is contained in:
@@ -156,6 +156,23 @@ func expectedResources(p *project.Project) (map[string]resourceExpectation, erro
|
||||
}
|
||||
}
|
||||
|
||||
compiledScripts, err := compileReferencedScripts(p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, resource := range compiledScripts {
|
||||
extension, ok := erf.ExtensionForResourceType(resource.Type)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unsupported compiled resource type for %s", resource.Name)
|
||||
}
|
||||
key := resourceKey(resource.Name, extension)
|
||||
out[key] = resourceExpectation{
|
||||
Key: key,
|
||||
Kind: "compiled-script",
|
||||
Bytes: resource.Data,
|
||||
}
|
||||
}
|
||||
|
||||
for _, rel := range p.Inventory.AssetFiles {
|
||||
abs := filepath.Join(p.AssetsDir(), filepath.FromSlash(rel))
|
||||
data, err := os.ReadFile(abs)
|
||||
|
||||
Reference in New Issue
Block a user