Files
vpp/extras/hs-test/tools/http_server/http_server.go
Adrian Villin eaa7d91ad7 hs-test: improved suite teardown and replaced PIDs with PPIDs
- Fixed an issue where containers wouldn't stop and get removed when
  a test run is interrupted
- Replaced PIDs with Ginkgo process indexes + PPIDs
- Fixed CPU allocation for envoy and nginx-ldp containers
- All container logs should now get saved properly

Type: test

Change-Id: I4c737c1d326390494c0dda1ec6d3fc1f04f51663
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-12 23:38:25 +00:00

27 lines
435 B
Go

package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
if len(os.Args) < 4 {
fmt.Println("arg expected")
os.Exit(1)
}
http.HandleFunc("/httpTestFile", func(w http.ResponseWriter, r *http.Request) {
file, _ := os.Open(os.Args[3] + "httpTestFile" + os.Args[2])
defer file.Close()
io.Copy(w, file)
})
err := http.ListenAndServe(os.Args[1], nil)
if err != nil {
fmt.Printf("%v\n", err)
os.Exit(1)
}
}