Skip to content

Commit

Permalink
add node-sass sample app and add integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
arroyc authored May 8, 2019
1 parent 7869c96 commit 32bf31d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/Oryx.Integration.Tests/NodeEndToEndTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,43 @@ await EndToEndTestHelper.BuildRunAndAssertAppAsync(
});
}

[Theory]
[MemberData(nameof(TestValueGenerator.GetNodeVersions), MemberType = typeof(TestValueGenerator))]
public async Task Node_NodeSassExample(string nodeVersion)
{
// Arrange
var appName = "node-sass-example";
var hostDir = Path.Combine(_hostSamplesDir, "nodejs", appName);
var volume = DockerVolume.Create(hostDir);
var appDir = volume.ContainerDir;
var portMapping = $"{HostPort}:{ContainerPort}";
var script = new ShellScriptBuilder()
.AddCommand($"cd {appDir}")
.AddCommand($"oryx -appPath {appDir} -bindPort {ContainerPort}")
.AddCommand(DefaultStartupFilePath)
.ToString();

await EndToEndTestHelper.BuildRunAndAssertAppAsync(
appName,
_output,
volume,
"oryx",
new[] { "build", appDir, "-l", "nodejs", "--language-version", nodeVersion },
$"oryxdevms/node-{nodeVersion}",
portMapping,
"/bin/sh",
new[]
{
"-c",
script
},
async () =>
{
var data = await _httpClient.GetStringAsync($"http://localhost:{HostPort}/");
Assert.Contains("<title>Node-sass example</title>", data);
});
}

[Fact]
public async Task Node_CreateReactAppSample()
{
Expand Down
1 change: 1 addition & 0 deletions tests/SampleApps/nodejs/node-sass-example
Submodule node-sass-example added at 2d5c06

0 comments on commit 32bf31d

Please sign in to comment.