Merge branch '16265-security-updates' into dependabot/bundler/apps/workbench/loofah...
[arvados.git] / lib / dispatchcloud / test / fixtures.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 package test
6
7 import (
8         "fmt"
9
10         "git.arvados.org/arvados.git/sdk/go/arvados"
11 )
12
13 // ContainerUUID returns a fake container UUID.
14 func ContainerUUID(i int) string {
15         return fmt.Sprintf("zzzzz-dz642-%015d", i)
16 }
17
18 // InstanceType returns a fake arvados.InstanceType called "type{i}"
19 // with i CPUs and i GiB of memory.
20 func InstanceType(i int) arvados.InstanceType {
21         return arvados.InstanceType{
22                 Name:         fmt.Sprintf("type%d", i),
23                 ProviderType: fmt.Sprintf("providertype%d", i),
24                 VCPUs:        i,
25                 RAM:          arvados.ByteSize(i) << 30,
26                 Price:        float64(i) * 0.123,
27         }
28 }