Files
mgmt/lang/interpret_test/TestAstFunc1/duplicate_resource/main.mcl
James Shubin 22105af720 lang: test: Add a test of duplicate resource generation
These two cases should be allowed in our language. This is something
that puppet got wrong, and hopefully this makes writing modules more
sane in mcl, since two modules both depending on a "cowsay" package
won't cause compile errors.

This only checks the language. The de-duplication is done there. We
don't currently have a check for this in the engine. (We should!)
2018-12-28 18:44:07 -05:00

18 lines
347 B
Plaintext

import "fmt"
# these two resources are identical to each other, so we should allow it
file "/tmp/foo" {
content => "hello world",
}
file "/tmp/foo" {
content => fmt.printf("hello world"),
}
# these two resources are compatible with each other, so we should allow it
pkg "cowsay" {
state => "installed",
}
pkg "cowsay" {
state => "newest",
}