• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Scalr / terraform-provider-scalr / 12300544223

12 Dec 2024 04:23PM UTC coverage: 76.614% (+0.4%) from 76.181%
12300544223

push

github

web-flow
SCALRCORE-26654 Provider > Migrate scalr_tag resource and datasource (#365)

* SCALRCORE-26653 Introduce internal packages

* SCALRCORE-26653 Implement provider server muxing

* SCALRCORE-26653 Resolve conflicts

* SCALRCORE-26653 CI: bump Go to 1.23

* SCALRCORE-26653 CI: bump golangci-lint

* SCALRCORE-26653 Remove deprecated rand.Seed calls

* SCALRCORE-26653 Doc formatting

* SCALRCORE-26653 Fix goveralls CI step

* SCALRCORE-26654 Move existing provider modules to internal/provider package

* SCALRCORE-26654 Move existing provider modules to internal/provider package

* SCALRCORE-26654 Inject version in SDK provider

* SCALRCORE-26654 Fix refactoring typos

* SCALRCORE-26654 Get rid of terraform-plugin-sdk logging package in http client

* SCALRCORE-26654 Rename datasource files

* SCALRCORE-26654 Add tag datasource; replace SDK imports in test modules with framework substitutes

* SCALRCORE-26654 * wip

* SCALRCORE-26654 * wip

* SCALRCORE-26654 * wip

* SCALRCORE-26654 * wip - preserve file move history

* SCALRCORE-26654 Replace legacy pointer fns with generic ptr()

* SCALRCORE-26654 Add tag resource

* SCALRCORE-26654 Add tag resource

* SCALRCORE-26654 Fix linter

* SCALRCORE-26654 Implement skaffolding generator

* SCALRCORE-26654 Add skaff readme

* SCALRCORE-26654 Add sdk->framework upgrade tests

470 of 684 new or added lines in 44 files covered. (68.71%)

2 existing lines in 1 file now uncovered.

7679 of 10023 relevant lines covered (76.61%)

119.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.5
/internal/framework/validation/string_not_whitespace.go
1
package validation
2

3
import (
4
        "context"
5
        "fmt"
6
        "strings"
7

8
        "github.com/hashicorp/terraform-plugin-framework-validators/helpers/validatordiag"
9
        "github.com/hashicorp/terraform-plugin-framework/schema/validator"
10
)
11

12
// Compile-time interface check
13
var _ validator.String = stringIsNotWhiteSpaceValidator{}
14

15
type stringIsNotWhiteSpaceValidator struct{}
16

17
func (v stringIsNotWhiteSpaceValidator) Description(_ context.Context) string {
344✔
18
        return "must not be empty or consisting entirely of whitespace characters"
344✔
19
}
344✔
20

NEW
21
func (v stringIsNotWhiteSpaceValidator) MarkdownDescription(ctx context.Context) string {
×
NEW
22
        return v.Description(ctx)
×
NEW
23
}
×
24

25
func (v stringIsNotWhiteSpaceValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {
171✔
26
        if req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {
212✔
27
                return
41✔
28
        }
41✔
29

30
        value := req.ConfigValue.ValueString()
130✔
31

130✔
32
        if strings.TrimSpace(value) == "" {
132✔
33
                resp.Diagnostics.Append(validatordiag.InvalidAttributeValueDiagnostic(
2✔
34
                        req.Path,
2✔
35
                        v.Description(ctx),
2✔
36
                        fmt.Sprintf("%q", value),
2✔
37
                ))
2✔
38

2✔
39
                return
2✔
40
        }
2✔
41
}
42

43
func StringIsNotWhiteSpace() validator.String {
3,954✔
44
        return stringIsNotWhiteSpaceValidator{}
3,954✔
45
}
3,954✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc