version_test.go 932 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  2. // SPDX-License-Identifier: Apache-2.0
  3. //go:build integration
  4. // +build integration
  5. package tests
  6. import (
  7. "testing"
  8. miniflux "miniflux.app/v2/client"
  9. )
  10. func TestVersionEndpoint(t *testing.T) {
  11. client := miniflux.New(testBaseURL, testAdminUsername, testAdminPassword)
  12. version, err := client.Version()
  13. if err != nil {
  14. t.Fatal(err)
  15. }
  16. if version.Version == "" {
  17. t.Fatal(`Version should not be empty`)
  18. }
  19. if version.Commit == "" {
  20. t.Fatal(`Commit should not be empty`)
  21. }
  22. if version.BuildDate == "" {
  23. t.Fatal(`Build date should not be empty`)
  24. }
  25. if version.GoVersion == "" {
  26. t.Fatal(`Go version should not be empty`)
  27. }
  28. if version.Compiler == "" {
  29. t.Fatal(`Compiler should not be empty`)
  30. }
  31. if version.Arch == "" {
  32. t.Fatal(`Arch should not be empty`)
  33. }
  34. if version.OS == "" {
  35. t.Fatal(`OS should not be empty`)
  36. }
  37. }