|
|
@ -17,6 +17,7 @@ limitations under the License.
|
|
|
|
package chartutil
|
|
|
|
package chartutil
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
|
|
|
|
"bytes"
|
|
|
|
"io/ioutil"
|
|
|
|
"io/ioutil"
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
@ -105,5 +106,14 @@ func TestCreateFrom(t *testing.T) {
|
|
|
|
if _, err := os.Stat(filepath.Join(dir, f)); err != nil {
|
|
|
|
if _, err := os.Stat(filepath.Join(dir, f)); err != nil {
|
|
|
|
t.Errorf("Expected %s file: %s", f, err)
|
|
|
|
t.Errorf("Expected %s file: %s", f, err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check each file to make sure <CHARTNAME> has been replaced
|
|
|
|
|
|
|
|
b, err := ioutil.ReadFile(filepath.Join(dir, f))
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
t.Errorf("Unable to read file %s: %s", f, err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if bytes.Contains(b, []byte("<CHARTNAME>")) {
|
|
|
|
|
|
|
|
t.Errorf("File %s contains <CHARTNAME>", f)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|