Skip to content

Commit

Permalink
Merge branch 'release/v0.3.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rucciva committed Feb 24, 2022
2 parents ac879ee + bf7ed3f commit 2c8bed6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.3.1

### Added

- Fix failing test by [@rucciva](https://github.com/rucciva).

## 0.3.0

### Added
Expand Down
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nebula Provider"
subcategory: ""
Expand All @@ -12,4 +13,4 @@ The Nebula provider provides resources to manage [Nebula Overlay Network](https:
<!-- schema generated by tfplugindocs -->
## Schema

This Provider has no schema.
This Provider has no schema.
5 changes: 3 additions & 2 deletions internal/provider/resource_ca_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/spf13/cast"
)

func TestAccResourceCA(t *testing.T) {
Expand Down Expand Up @@ -125,10 +126,10 @@ func TestAccResourceCAImport(t *testing.T) {
if v := state.Attributes["cert"]; v != string(rawCACert) {
return fmt.Errorf("invalid certificate, got %s", v)
}
if v := state.Attributes["not_after"]; v != "2023-02-24T13:47:48+07:00" {
if v := cast.ToTime(state.Attributes["not_after"]); !v.Equal(cast.ToTime("2023-02-24T13:47:48+07:00")) {
return fmt.Errorf("invalid not_after, got %s", v)
}
if v := state.Attributes["not_before"]; v != "2022-02-24T13:47:48+07:00" {
if v := cast.ToTime(state.Attributes["not_before"]); !v.Equal(cast.ToTime("2022-02-24T13:47:48+07:00")) {
return fmt.Errorf("invalid not_before, got %s", v)
}
return nil
Expand Down
5 changes: 3 additions & 2 deletions internal/provider/resource_cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/spf13/cast"
)

func TestAccResourceCertificate(t *testing.T) {
Expand Down Expand Up @@ -177,10 +178,10 @@ func TestAccResourceCertificateImport(t *testing.T) {
if v := state.Attributes["cert"]; v != string(rawCACert) {
return fmt.Errorf("invalid certificate, got %s", v)
}
if v := state.Attributes["not_after"]; v != "2023-02-24T13:47:47+07:00" {
if v := cast.ToTime(state.Attributes["not_after"]); !v.Equal(cast.ToTime("2023-02-24T13:47:47+07:00")) {
return fmt.Errorf("invalid not_after, got %s", v)
}
if v := state.Attributes["not_before"]; v != "2022-02-24T13:47:58+07:00" {
if v := cast.ToTime(state.Attributes["not_before"]); !v.Equal(cast.ToTime("2022-02-24T13:47:58+07:00")) {
return fmt.Errorf("invalid not_before, got %s", v)
}
return nil
Expand Down
3 changes: 2 additions & 1 deletion templates/index.md.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "{{.ProviderShortName}} Provider"
subcategory: ""
Expand All @@ -14,4 +15,4 @@ The Nebula provider provides resources to manage [Nebula Overlay Network](https:
{{- end }}
{{ .SchemaMarkdown | trimspace }}

This Provider has no schema.
This Provider has no schema.

0 comments on commit 2c8bed6

Please sign in to comment.